Investment databases conventionally store quantitative information regarding stocks, mutual funds, and other types of investments. Investors and financial analysts can query such databases using conventional database query tools and techniques. For example, an investor can query such a database to identify all stocks having a price-to-earnings ratio (P/E) less than 40 using a query string such as "P/E&lt;40." In such a query, "P/E" identifies a column in a database table, "&lt;" indicates an operator to be applied in the query, and "40" indicates a desired value to which the operator will be applied in order to qualify the database query results. Users can also concatenate multiple criteria into a single query to create compound queries (e.g., "P/E&lt;40 AND growth rate&gt;10%"). With such compound queries, multiple conditions must be satisfied before a record is included in the query results.
One problem with conventional database query techniques is that it is difficult and cumbersome to save and reuse previous queries with slightly different parameters. For example, if an investor changed his investment interest to companies having a P/E&lt;50 while leaving the other query parameters unchanged, he would have to save the query string, edit the string to locate the 40 and replace it with 50, and re-run the query. Additionally, the user may have difficulty remembering allowable values for fields that can assume only a predetermined set of values (e.g., the name for a particular industry), thus increasing the possibility of user input error. Where a large number of criteria are needed, these problems are compounded.
The "Access" database product sold by Microsoft Corporation provides a "parameter query" feature that permits a user to enter a parameter value at query execution time. As shown in FIG. 15, for example, a user can create a database query by selecting a field name ("LastName") and specifying a text message that will be displayed when the query is executed. In FIG. 15, the user-specified text message is "What is the last name of the user you are looking for?" When the query is executed, the database query engine detects the special parameterized query and prompts the user to enter a value for the field, as shown in FIG. 16. Consequently, one possible approach for implementing reusable database queries is to use a "parameter query" feature such as that found in the Access database product.
The techniques shown in FIGS. 15 and 16 are generally not well suited for implementing reusable database queries, and incur high processing costs. For example, the database query engine runs until it hits a parameterized query such as that shown in FIG. 15, and then must stop the query until the user enters a value for the parameter. This wastes valuable processing time, particularly in a client/server environment where the database engine is located on a server computer and services a plurality of client computers. Moreover, the techniques shown in FIGS. 15 and 16 are not particularly user-friendly and require substantial knowledge and typing on the part of the user. For example, the user must actually create a prompt and type it into the table shown in FIG. 15. Such techniques would not be well suited for novice investors, for example, who may not be knowledgeable about databases and their modes of operation.